import { authReducer } from './auth/reducers/auth.reducer';
import { environment } from './../environments/environment';


// import state interface
import { AppState } from './interfaces';

import { combineReducers, ActionReducer, ActionReducerMap } from '@ngrx/store';


import { compose } from '@ngrx/core/src/compose';

import { storeFreeze } from 'ngrx-store-freeze';

// const reducers = {
//   auth: authReducer
// };

// export const developmentReducer: ActionReducer<AppState> = compose(storeFreeze, combineReducers)(reducers);
// const productionReducer: ActionReducer<AppState> = combineReducers(reducers);


// export function reducer(state: any, action: any) {

//   if (environment.production) {
//     return productionReducer(state, action);
//   } else {
//     return developmentReducer(state, action);
//   }
// }
export const reducers: ActionReducerMap<AppState> = {
  auth: authReducer
};
